package com.harmontronics.hanma.paas.paas.scheduler;

import com.harmontronics.hanma.paas.paas.domain.app.service.DataSourceHolder;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Service;

/**
 * @author ldb
 */
@Service
public class SchedulerService {

    @Autowired
    private DataSourceHolder dataSourceHolder;

    @Scheduled(cron = "0 */5 * * * ?")
    public void cleanDatasource(){
        dataSourceHolder.clean();
    }
}
